/*
 * @Author: 李小晴 2689279066@qq.com
 * @Date: 2023-03-14 10:49:42
 * @LastEditors: 李小晴 2689279066@qq.com
 * @LastEditTime: 2023-11-27 10:29:05
 * @FilePath: \sys\src\api\file\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()
// {{apiurl}}/index.php/tools/excel
// 疫苗记录
export const zcVaccineFormListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcVaccineFormList',
      data: data
    }
  })
}

// 组织主档列表
export const dbOrgListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbOrgList',
      data: data
    }
  })
}

// 导出组织主档excel文件
export const dbOrgexcelApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbOrgList',
      data: data
    }
  })
}

// 资产主档列表
export const dbAssetApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbAssetList',
      data: data
    }
  })
}

// 导出资产主档excel文件
export const dbAssetListApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbAssetList',
      data: data
    }
  })
}

// 导出用户列表主档excel文件
export const dbUserListApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbUserList',
      data: data
    }
  })
}

// 商品列表
export const dbGoodsListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbGoodsList',
      data: data
    }
  })
}

// 导出商品主档excel文件
export const dbGoodsexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbGoodsList',
      data: data
    }
  })
}

// 牧场主档列表
export const dbPastureListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbPastureList',
      data: data
    }
  })
}

// 导出牧场主档excel文件
export const dbPastureexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbPastureList',
      data: data
    }
  })
}

// 药品主档列表
export const dbDrugListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbDrugList',
      data: data
    }
  })
}

// 导出药品主档excel文件
export const dbDrugexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbDrugList',
      data: data
    }
  })
}

// 饲料主档列表
export const dbForageSpecsListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbForageSpecsList',
      data: data
    }
  })
}

// 导出饲料主档excel文件
export const dbForageSpecsexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbForageSpecsList',
      data: data
    }
  })
}

// 盘点查看列表
export const dbInventorySeeApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbInventorySee',
      data: data
    }
  })
}

// 导出盘点主档excel文件
export const dbInventorySeeexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbInventorySee',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 疫苗列表
export const dbVaccineDrugDetailedListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbVaccineDrugDetailedList',
      data: data
    }
  })
}

// 疫苗主档excel文件
export const dbVaccineDetailedexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbVaccineDetailedList',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 就医列表
export const dbMedicalDrugDetailedListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbMedicalDrugDetailedList',
      data: data
    }
  })
}

// 就医主档excel文件
export const dbMedicalDrugDetailedexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbMedicalDrugDetailedList',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 订单列表
export const dbCsOrderListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbCsOrderList',
      data: data
    }
  })
}

// 订单主档excel文件
export const dbCsOrderexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbCsOrderList',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 入款单列表
export const dbCsIncomeListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbCsIncomeList',
      data: data
    }
  })
}

// 入款单主档excel文件
export const dbCsIncomeexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbCsIncomeList',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 提现单列表
export const dbCsWithdrawalListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbCsWithdrawalList',
      data: data
    }
  })
}

// 提现单主档excel文件
export const dbCsWithdrawalexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbCsWithdrawalList',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 收支明细单列表
export const dbCsOrgPayLogListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbCsOrgPayLogList',
      data: data
    }
  })
}

// 收支明细单主档excel文件
export const dbCsOrgPayLogexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbCsOrgPayLogList',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 保险单列表
export const dbInsuranceOrderDetailedListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbInsuranceOrderDetailedList',
      data: data
    }
  })
}

// 保险单主档excel文件
export const dbInsuranceOrderDetailedexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbInsuranceOrderDetailedList',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 贷款单列表
export const dbLoanOrderDetailedListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbLoanOrderDetailedList',
      data: data
    }
  })
}

// 贷款单主档excel文件
export const dbLoanOrderDetailedexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbLoanOrderDetailedList',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 打标单列表
export const dbMarkOrderSeeApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbMarkOrderSee',
      data: data
    }
  })
}

// 打标单主档excel文件
export const dbMarkOrderSeeexportApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'dbMarkOrderSee',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 喂养单导出excel
export const spFeedSeeExcelApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'spFeedSee',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 配方导出excel
export const spForageFormulaSeeExcelApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/common',
    headers: { token: wsCache.get('token') },
    data: {
      api_code: 'spForageFormulaSee',
      request: data.request,
      layout_data: data.layout_data
    }
  })
}

// 月报列表
export const dbMonthReportListApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbMonthReportList',
      data: data
    }
  })
}

// 月报查看
export const dbMonthReportSeeApi = (data: any) => {
  return request.post({
    url: '/index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'dbMonthReportSee',
      data: data
    }
  })
}

export const dbMonthReportListExcelApi = (data: any) => {
  return request.post({
    url: '/index.php/tools/excel/month_report',
    headers: { token: wsCache.get('token') },
    data: {
      request: data
    }
  })
}
